/*
 * @Author: 涵崽
 * @Date: 2023-11-10 10:42:19
 * @email: 1045654@qq.com
 * @gitee: https://gitee.com/han-zai
 * @LastEditors: 涵崽
 * @LastEditTime: 2023-11-10 11:26:51
 * @Description: 文字超出宽度显示省略号
 *
 * 使用方法(不传值默认为100)
 * <div v-ellipsis:200px> 需要省略的文字是阿萨的副本阿萨的副本阿萨的副本阿萨的副本</div>
 */
export default function (el, binding) {
  el.style.width = binding.arg || 100 + "px";
  el.style.whiteSpace = "nowrap";
  el.style.overflow = "hidden";
  el.style.textOverflow = "ellipsis";
}
